﻿using TheMethod;
namespace LeastSquare
{/// <summary>
/// 具体实现
/// </summary>

    internal class Program
    {
        static void Main(string[] args)
        {
            Points[] obj = new Points[26];
            obj[0] = new Points(1995, 734547898224);
            obj[1] = new Points(1996, 863746717507);
            obj[2] = new Points(1997, 9616.03952954);
            obj[3] = new Points(1998, 1029043097558);
            obj[4] = new Points(1999, 1093997267277);
            obj[5] = new Points(2000, 1211346869600);
            obj[6] = new Points(2001, 1339395718862);
            obj[7] = new Points(2002, 1470550015077);
            obj[8] = new Points(2003, 1660287965663);
            obj[9] = new Points(2004, 1955347004965);
            obj[10] = new Points(2005, 2285965892364);
            obj[11] = new Points(2006, 2752131773358);
            obj[12] = new Points(2007, 3550342737009);
            obj[13] = new Points(2008, 4594307032667);
            obj[14] = new Points(2009, 5101703073088);
            obj[15] = new Points(2010, 6087163874510);
            obj[16] = new Points(2011, 7551500124197);
            obj[17] = new Points(2012, 8532229986993);
            obj[18] = new Points(2013, 9570406235659);
            obj[19] = new Points(2014, 10475682920597);
            obj[20] = new Points(2015, 11061553079871);
            obj[21] = new Points(2016, 11233276536744);
            obj[22] = new Points(2017, 12310409370894);
            obj[23] = new Points(2018, 13894817549380);
            obj[24] = new Points(2019, 14279937500608);
            obj[25] = new Points(2020, 14687673892882);
            Console.WriteLine("请输入年份");
            int year = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine($"{year}年份预测值为{Method.Methods(obj, year).ToString()}");
        }
    }
}